// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'
import Client from '@api/base/api/SysPropertyApi'

import ListClass from '@api/base/model/QuerySysPropertyListReq'
import BaseClass from '@api/base/model/SysPropertyDto'

const CLIENT = CORE.grpcCLIENT(Client)
const BASE = [BaseClass, 'content']

// ============================== 导出远程接口 ============================== //

export default {
  // —————————————————————————————— 列表 —————————————————————————————— //

  async getList(param = {}, TIP = '查询子系统列表（下拉）') {
    const DTO = CORE.grpcDTO(ListClass, { ...param, parentId: '93' }, BASE)
    const { content } = await CORE.grpc(TIP, CLIENT, 'querySysPropertyList', DTO)
    return ['SUB_SYSTEM', content]
  },
}
